package safety.impl;

import agricultural.AgriculturalMachine;
import safety.SafetyEventType;
import safety.SafetyHandler;

public class PathAdjustmentHandler extends SafetyHandler {
    @Override
    public void handleSafetyEvent(SafetyEventType eventType, AgriculturalMachine machine) {
        if (eventType == SafetyEventType.OBSTACLE_DETECTED) {
            System.out.println("路径调整处理器: " + machine.getMachineId() + "重新规划路径，避开障碍物区域");
        } else if (nextHandler != null) {
            nextHandler.handleSafetyEvent(eventType, machine);
        }
    }
}    